package com.cn.controller.dz;
import java.io.IOException;

import javax.servlet.ServletException;
/**
 * 租车条件设置
 */
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cn.controller.BaseServlet;

@WebServlet("/setinfo")
public class Setinformation extends BaseServlet {
		@Override
		protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
			String citygo = req.getParameter("city1");
			String cityre = req.getParameter("city2");
			String storgo = req.getParameter("selectgo");
			String storre = req.getParameter("selectre");
			String timego = req.getParameter("date1");
			String timere = req.getParameter("date2");
			String day = req.getParameter("indays");
			if(day==null){day=""+2;}
			String  days = day;
			
			//设置 存放到seesion
			req.getSession().setAttribute("go", citygo+storgo);
			req.getSession().setAttribute("return", cityre+storre);
			req.getSession().setAttribute("timego", timego);
			req.getSession().setAttribute("timere", timere);
			req.getSession().setAttribute("dayss", days);
			
			resp.sendRedirect("dz");
		}
}
